#include "MineDesign3D/ViewManager.hpp"

#include <Windows.h>
#include <GL/GL.h>

#include "GLHelper/ScopedMatPush.hpp"
#include "GLHelper/ScopedAttribPush.hpp"
#include "GLHelper/BrendMode.hpp"
namespace MineDesign3D{
void ViewManager::renderLookAt()const
{
	GLHelper::ScopedMatPush smp;
	GLHelper::ScopedAttribPush sap(GL_CURRENT_BIT);

	vector3 LookAt = this->getLookAt();
	glTranslatef(LookAt.x,LookAt.y,LookAt.z);

	glColor4f(0,1.f,1.f,0.3f);

	GLHelper::ApplyBrendMode(GLHelper::BLEND_LINEAR);

	const float WIDTH = 7.f;
	glBegin(GL_LINES);
		glVertex3f(-WIDTH*0.5f,0,0);
		glVertex3f(WIDTH*0.5f,0,0);

		glVertex3f(0,-WIDTH*0.5f,0);
		glVertex3f(0,WIDTH*0.5f,0);

		glVertex3f(0,0,-WIDTH*0.5f);
		glVertex3f(0,0,WIDTH*0.5f);
	glEnd();

	GLHelper::ApplyBrendMode(GLHelper::BLEND_OPAQUE);
}
}//MineDesign3D